package cn.itsource.org.mapper;

import cn.itsource.org.domain.Employee;
import cn.itsource.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zj
 * @since 2022-11-29
 */
@Component
public interface EmployeeMapper extends BaseMapper<Employee> {
    Employee loadByUserName(String username);

    void removeEmployeeRole(Long id);

    void saveEmployeeRole(@Param("eid") Long id, @Param("rids") List<Long> roles);

    /**
     * 查询loginInfo所属的员工对象(店铺管理员)
     * @param loginInfoId
     * @return
     */
    Employee findByLoginInfoId(Long loginInfoId);
}
